package com.demo.bootmystarter.autoconfiguration;

import com.demo.bootmystarter.MyFromatTemplate;
import com.demo.bootmystarter.format.FormatProcessor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Import(FromatConfiguration.class)
@Configuration
@EnableConfigurationProperties(MyProperties.class)
public class MyAutoConfiguration {


    @Bean
    public MyFromatTemplate myFromatTemplate(MyProperties myProperties, FormatProcessor formatProcessor) {

        return new MyFromatTemplate(myProperties,formatProcessor);
    }
}